CC = g++

# 包含路径
INCLUDES = $(shell pkg-config --cflags libavcodec libavformat libavutil libswscale libswresample libavfilter) \
		   $(shell pkg-config --cflags sdl2) 

# 库路径和库文件
LIBS = $(shell pkg-config --libs libavcodec libavformat libavutil libswscale libswresample libavfilter) \
	   $(shell pkg-config --libs sdl2)

# 项目源文件
SRCS = video_player/main.cpp

# 生成的可执行文件
TARGET = test

# 编译规则
all: $(TARGET)

$(TARGET): $(SRCS)
	$(CC) $(INCLUDES) -o $(TARGET) $(SRCS) $(LIBS)

# 清理生成的文件
clean:
	rm -f $(TARGET)

.PHONY: all clean
